package com.dragon.modules.yuegou.mapper.product;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dragon.modules.yuegou.entity.product.CoupMemberRecordEntity;
import com.dragon.modules.yuegou.model.product.CoupMemberRecord;
import com.dragon.modules.yuegou.model.product.CouponGrantRecord;
import com.dragon.modules.yuegou.model.product.ReceiveCommodityCouponModel;
import com.dragon.modules.yuegou.request.ReceivedProCouponPageRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 会员领取记录表 Mapper接口
 *
 * @author pbuilder generated
 * @date 2021-05-07 09:22:29
 * @version 2.0
 */
@Component("proCoupMemberRecordMapper")
public interface CoupMemberRecordMapper extends BaseMapper<CoupMemberRecordEntity> {

    IPage<ReceiveCommodityCouponModel> receivePage(IPage<CoupMemberRecordEntity> toPage, @Param("request") ReceivedProCouponPageRequest request);

    List<ReceiveCommodityCouponModel> receiveList(@Param("request") ReceivedProCouponPageRequest request);

    IPage<CouponGrantRecord> grantRecords(IPage<CategoryMapper> toPage, @Param("merchantId") String merchantId);

    List<CoupMemberRecord> totalQuantity(@Param("coupTemplateIdList") List<String> coupTemplateIdList);
}
